home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.2r / card_29720.txt < prev    next >
Text File  |  1989-02-26  |  5KB  |  66 lines

  1. -- card: 29720 from stack: in.2r
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2612
  5. -- name: DispPict
  6.  
  7.  
  8. -- part contents for background part 2
  9. ----- text -----
  10. DispPict
  11.  
  12. -- part contents for background part 3
  13. ----- text -----
  14. This is version 1.3 of the DispPict XCMD.
  15.  
  16. This is a demo of the DispPICT XCMD for displaying MacPaint and PICT files   (like those created with MacDraw or a host of other programs that support that format).  DispPICT will also display color or gray scale pictures on a Mac II.  
  17.  
  18.  
  19. Please send any comments or bug reports to one of the following addresses.
  20.  
  21. David Fry
  22. 81 Irving Street
  23. Cambridge, MA   02138
  24.  
  25. CompuServe: 73317,1265
  26. GEnie:D.FRY
  27. ARPANET: fry@huma1.harvard.edu
  28. BITNET: fry@harvma1.bitnet
  29.  
  30.  
  31.  
  32.  
  33. -- part contents for background part 10
  34. ----- text -----
  35. Syntax:
  36.  
  37. DispPICT fileName[,windowing][,bestColors][,left,top][,right,bottom][,delay][,leftpixel,toppixel]
  38.  
  39. (Note: the command must be typed on one line, or be separated into two lines with an option-Return character.)
  40.  
  41. Only the fileName parameter is required.   It must be in quotes, however, and it must be a complete pathname.  DispPICT does not look in the Home stack to determine where to find documents.
  42.  
  43. "fileName" is the file you want to display.  DispPICT can display MacPaint pictures, and pictures of type 'PICT' (such as those made with MacDraw, Cricket Draw, GrayView, etc).  If the picture has color in it, and DispPICT is running on a Mac II, the color will be shown. DispPICT can also show any file containing a PICT resource with ID = 0.  These files can be used as StartUpScreens on a Mac II and can be generated by several programs.
  44.  
  45. "windowing" is either 0 or 1.  If 1, DispPICT will show the picture in a moveable, resizeable, scrolling window with a zoom and goaway box.  If windowing = 0, the picture will be displayed in a fixed window with no borders, a sort of "Post-IT" picture.  It will be closed as soon as the user clicks the mouse on top of it.  The default is 0.
  46.  
  47. "bestColors" is either 0 or 1; it is for use on a Mac II.  If 1, DispPICT will determine which colors are best suited for displaying the picture, and will use those.  This is useful for pictures with specialized color needs.  If 0, DispPICT will use the colors currently available on the Mac.  This is probably adequate for most pictures.  The default is 0.  The value is ignored if DispPICT is run on a non-Mac II computer or if a non-color picture is being displayed.
  48.  
  49. "left" and "top" specify where the top left corner of the window will lie on the screen.  If left = top = 0, DispPICT will center the picture on the whole screen.  This is the default.
  50.  
  51. "right" and "bottom" specify the bottom right corner of the window.  If right = bottom = 0, or if top = bottom = 0, the values are ignored.  This is the default.
  52.  
  53. "delay" specifies the number of seconds you want to the picture to appear on the screen before going away automatically.  With this you can set up StartupScreens for stacks that let you continue after a brief pause.  The user can still close the window normally (via the goaway box if windowing = 1, or by click on the picture if windowing = 0) before "delay" seconds have passed.  If delay = 0 the window will stay up indefinitely.  This is the default.
  54.  
  55. "leftpixel," and "toppixel" allow you to specify what pixel of the actual picture should appear in the top left corner of the window.  If windowing = 1, it will look like the user already scrolled to that point. The default is leftpixel = toppixel = 0;
  56.  
  57. DispPICT also returns a value which HyperCard can access with "the result" function.  It specifies the pixel (in h,v coordinates) in the picture that the user lasted clicked on.  This allows HyperCard scripts to figure out what part of the photo someone chose, sort of like transparent buttons.  If there was no mouse click in the window, the returned value is 0,0.
  58.  
  59. SPECIAL NOTE:  Depending how much memory is available to HyperCard, DispPICT will use two different methods for scrolling when windowing = 1.  If there is surplus silicon, it will use an offscreen pixel map for maximum speed.  What this means to you is that scrolling will be very smooth.  However, if memory is low, DispPICT will not be able to do that trick, and scrolling will be substantially slower.  In particular, you can notice this effect by placing HyperCard in ever smaller MultiFinder partitions.
  60.  
  61. If any error occurs, DispPICT will beep once and return an error message.  The possible errors are "File not found," "Not enough memory," and "PICT could not be opened."
  62.  
  63.  
  64. -- part contents for background part 13
  65. ----- text -----
  66. 22